<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
        }

        body {
            /* width: 100%;
            height: 100%;
            text-align: center;
            position: relative; */
            /* display: flex;
            justify-content: center;
            align-items: center; */
        }

        .box {
            text-align: center;
            /*让div内部文字居中*/
            background-color: #f00;
            border-radius: 20px;
            width: 300px;
            height: 350px;
            margin: auto;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;


        }
    </style>
</head>

<body>

    <div class="box">11</div>
</body>

</html>